<?php

namespace TableTennis\PartnerBundle\Repository;

use Doctrine\ORM\EntityRepository;

class PartnerRepository extends EntityRepository
{

    public function getPartners(){

        $q = $this->getEntityManager()->createQueryBuilder('p')
                  ->select('p.title')
                  ->from('TableTennisLicenseeBundle:Partner', 'p')
                  ->orderBy('p.title', 'ASC')
                  ->getQuery();

        return $q;
    }
}